<%@page import="com.portlet.service.roleLocalServiceUtil"%>
<%@page import="com.portlet.service.bophanLocalServiceUtil"%>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@page import="java.util.*" %>
<%@page import="com.portlet.model.*"%>
<%@ page pageEncoding="UTF-8" %>
<portlet:defineObjects />

<%
	int countBP=bophanLocalServiceUtil.getbophansCount();
	List<bophan>listBP=bophanLocalServiceUtil.getbophans(0, countBP);

	int countVT=roleLocalServiceUtil.getrolesCount();
	List<role>listRL=roleLocalServiceUtil.getroles(0, countVT);
%>
<h4>Thêm nhân viên</h4>

<portlet:actionURL name="addNV" var="actionNVURL">
</portlet:actionURL>
	<aui:form action="<%=actionNVURL.toString()%>" method="post">
		
		<aui:input type="text" name="maNV" id="maNV" label="Mã Nhân Viên"/>
	<br>
		<aui:input type="text" name="tenNV" id="tenNV" label="Tên Nhân Viên"/>
	<br />
		<aui:select name="gioitinh" id="selectGT" label="Giới tính">
			<aui:option value="nu" label="Nữ"></aui:option>
			<aui:option value="nam" label="Nam"></aui:option>
		</aui:select>
	<br>
		<aui:input type="date" name="ngaysinh" id="ns" label="Ngày Sinh"></aui:input>
	<br>
		<aui:select name="maBP" label="Mã bộ phận" id="selectedBP">
			<%for(bophan bp:listBP) {%>
				<aui:option value="<%=bp.getMaBoPhan() %>" label="<%=bp.getTenBoPhan() %>" />
			<%} %>
			
		</aui:select>
		<aui:select name="maRL" label="Mã vai trò" id="selectedRL">
			<%for(role rl:listRL) {%>
				<aui:option value="<%=rl.getMaRole() %>"
			label="<%=rl.getTenRole() %>" />
			<%} %>
		</aui:select>
	<aui:input type="submit" name="Save" value="Save" />
	</aui:form>
<portlet:renderURL var="viewHomeURL">
	<portlet:param name="mvcPath" value="/viewNV.jsp" />
</portlet:renderURL>
<p>
	<a href="<%=viewHomeURL%>">Back</a>
</p>